-
Notifications
You must be signed in to change notification settings - Fork 59.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hotfix haiku not support vision #5771
hotfix haiku not support vision #5771
Conversation
@lloydzhou is attempting to deploy a commit to the NextChat Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes involve modifications to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Utils
User->>Utils: Check if model is vision model
Utils->>Utils: Evaluate model string
Utils->>Utils: Match against keywords
alt Match found
Utils-->>User: Return true
else No match
Utils-->>User: Return false
end
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Your build has completed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
app/utils.ts (1)
259-260
: Consider adding a comment explaining the model mappings.To improve maintainability, consider adding a comment that maps these keywords to their corresponding model variants (e.g., "-sonnet-" → Claude-3-Sonnet, "-opus-" → Claude-3-Opus).
const visionKeywords = [ "vision", + // Claude-3 model variants "-sonnet-", // Claude-3-Sonnet "-opus-", // Claude-3-Opus "gemini-1.5-pro",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
app/utils.ts
(1 hunks)
🔇 Additional comments (1)
app/utils.ts (1)
259-260
: LGTM! Please verify Claude-3 model identifiers.
The addition of "-sonnet-" and "-opus-" keywords provides more precise identification of Claude-3 vision-capable models. This change aligns with the PR's objective to fix vision support.
Let's verify the model identifiers in the codebase:
✅ Verification successful
Vision support correctly configured for Claude-3 model variants
The verification confirms that the added keywords "-sonnet-" and "-opus-" correctly match the Claude-3 model identifiers found in app/constant.ts
:
- claude-3-sonnet-20240229
- claude-3-opus-20240229
- claude-3-opus-latest
- claude-3-5-sonnet-20240620
- claude-3-5-sonnet-20241022
- claude-3-5-sonnet-latest
The changes ensure proper vision capability detection for both Claude-3 and Claude-3.5 variants.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for Claude-3 model references to confirm the correct identifiers
rg -i "claude.*3|sonnet|opus" --type ts
Length of output: 6981
是接口问题,不是模型支持的问题 |
It's an interface problem, not a model support problem |
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
📝 补充信息 | Additional Information
Summary by CodeRabbit
New Features
Bug Fixes